<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="js/My97DatePicker/WdatePicker.js"></script>
<script >
function taskdetail(taskid){
	window.location.href="taskdetail?taskquery.task_id="+taskid;
}

</script>




<title>任务信息查询</title>
</head>
<body>
<form action="taskqueryself" method="post">
    <table>
    <tr>
    <td>任务信息查询</td>
    </tr>
<tr>
</tr>
<tr>
</tr>
<tr>
        <td>任务标题</td>
        <td><input name="taskquery.task_name"  type="text" value="${obj.taskquery.task_name}"/></td>
        <td></td>
        <td></td>
        <td></td> 
        <td></td>      
        <td>状态</td>       
        <td>
                <select id="State" name="taskquery.rem_status"  > 
                    <option value="" <c:if test="${obj.taskquery.rem_status==''}">selected="selected"</c:if>>请选择</option>  
                    <option value="1" <c:if test="${obj.taskquery.rem_status=='1'}">selected="selected"</c:if>>有效</option>
                    <option value="0" <c:if test="${obj.taskquery.rem_status=='0'}">selected="selected"</c:if>>失效</option>         
                </select>
        </td>
</tr>   
<tr>   
        <td>组名</td>
        <td><input name="taskquery.group_name" type="text" value="${obj.taskquery.group_name}"/></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td>提醒类型</td>       
        <td>
                <select id="State" name="taskquery.rem_type"  > 
                    <option value="" <c:if test="${obj.taskquery.rem_type==''}">selected="selected"</c:if>>请选择</option>
                    <option value="0" <c:if test="${obj.taskquery.rem_type=='0'}">selected="selected"</c:if>>单次</option>
                    <option value="1" <c:if test="${obj.taskquery.rem_type=='1'}">selected="selected"</c:if>>周期</option>
                </select>
        </td>
      
</tr>
<tr>
        <td>组员</td>
        <td><input name="taskquery.member_name" type="text" value="${obj.taskquery.member_name}"/></td> 
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td>提醒方式</td>
        
        <td>
                <select id="State" name="taskquery.rem_way"  > 
                    <option value="" <c:if test="${obj.taskquery.rem_way==''}">selected="selected"</c:if>>请选择</option>
                    <option value="0" <c:if test="${obj.taskquery.rem_way=='0'}">selected="selected"</c:if>>邮件</option>
                    <option value="1" <c:if test="${obj.taskquery.rem_way=='1'}">selected="selected"</c:if>>短信</option>
                    <option value="0,1" <c:if test="${obj.taskquery.rem_way=='0,1'}">selected="selected"</c:if>>短信和邮件</option>
                </select>
        </td>
</tr>



<!-- 
<tr>
        <td>开始时间</td>
        <td><input  id="startdate" name="taskquery.rem_start_date" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"  value="${obj.rem_start_date}"> 
        </td>
        <td>结束时间</td>
        <td><input id="enddate" name="taskquery.rem_end_date" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" value="${obj.rem_end_date}"> 
</td>
</tr> 
 -->  
 
 
   
<tr>
</tr>
<tr>
</tr> 
   <tr>
    <td colspan="4"><input type="submit" value="查询"></td>
   </tr>
    
  </table>  
    <table width="100%" border="1">
    <tr>
        <th>ID</th>
        <th>任务标题</th>
        <th>提醒方式</th>
        <th>提醒类型</th>
        <th>生效状态</th>
        <th>周期类型</th>
        <th>提醒时间</th>           
        <th>开始时间</th>
        <th>结束时间</th>
        <th>操作</th>
        
      
    </tr>
    <c:forEach items="${obj.tasklist}" var="tasklist" varStatus="s">
        <tr>
            <td align="center">${s.index+1}</td>
            <td align="center">${tasklist.task_name}</td>
            <td align="center">
            <c:choose>
            <c:when test="${tasklist.rem_way=='0'}">邮件</c:when>
            <c:when test="${tasklist.rem_way=='1'}">短信</c:when>
            <c:otherwise>邮件和短信</c:otherwise>
            </c:choose>
            </td>
            <td align="center">
            <c:choose>
            <c:when test="${tasklist.rem_type=='0'}">单次</c:when>
            <c:when test="${tasklist.rem_type=='1'}">周期</c:when>
            </c:choose>
            </td>
            <td align="center">
            <c:choose>
            <c:when test="${tasklist.rem_status=='0'}">无效</c:when>
            <c:when test="${tasklist.rem_status=='1'}">有效</c:when>
            </c:choose>
            </td>
            
            <td align="center">
            <c:choose>
            <c:when test="${tasklist.cycle_type=='0'}">按天</c:when>
            <c:when test="${tasklist.cycle_type=='1'}">按周</c:when>
            <c:when test="${tasklist.cycle_type=='2'}">按月</c:when>
            <c:otherwise>-</c:otherwise>
            </c:choose>
            </td>
            
            <td align="center">${tasklist.rem_first_time}</td>
            
            <td align="center">${tasklist.rem_start_date}</td>
            <td align="center">${tasklist.rem_end_date}</td>
            <td align="center">
                <input type="button" value="查看详情" onclick="taskdetail(${tasklist.task_id});">
                </td>
        </tr>
    </c:forEach>
</table>
 
</form>
</body>
</html>